package com.trsvax.gwthello.pages.examples;

import java.util.Date;

import org.apache.tapestry5.annotations.InjectComponent;
import org.apache.tapestry5.annotations.Persist;
import org.apache.tapestry5.annotations.Property;
import org.apache.tapestry5.corelib.components.Zone;

import com.trsvax.gwthello.client.gwtui.services.DatePickerService;

public class DatePicker implements DatePickerService {
	@Property
	@Persist
	private Date date;
	@InjectComponent
	private Zone dateZone;

	public String date(Date date) {
		this.date = date;
		return "got " + this.date;
	}

	Object onNewDate() {
		return dateZone.getBody();
	}

}
